# []
name_list = ["maka", "baka","chip","Dale","Tom","Jerry","Rick","Morty"]
# x=name_list.index("chip")
# print(x)
# l = len(name_list)
# for name_list in range (int(l)):
#      # if name_list=="chip":
#         print(l)
        # break
# int(
# fruits = ['apple', 'banana', 'cherry']
# x = fruits.index("cherry")
# print(x)

# name_list = ["maka", "baka","chip","Dale","Tom","Jerry" ,"Rick" ,"Morty"]# x=name_list.index("chip")# print(x)
# l =len(name_list)
# for i in range (l):
#     print(name_list[i] ,i)
#
#
# # li = [10,8,9,26,72,6,28]
# # print(8,li.index(8))
# thisset = {"apple", "banana", "cherry"}
# if "banana" in thisset:
#     print("banana" in thisset)

# thisdict = {
#   "brand": "Ford",
#   "model": "Mustang",
#   "year": 1964
# }
# thisdict.pop("model")
# print(thisdict)
#
#
#
#
# a_dict = {'name':'DYX', 'sex':'male', 'age':24}
# temp = a_dict.pop("name")
# print(temp) #DYX
# print(a_dict)
#
# thisset = {"apple", "banana", "cherry"}
# x = thisset.pop()
# print(x)
# print(thisset)
# #dictionary 中删除指定items的tip---👉用for循环＋del
# myfamily = {
#   "child1" : {
#     "name" : "Emil",
#     "year" : 2004
#   },
#   "child2" : {
#     "name" : "Tobias",
#     "year" : 2007
#   },
#   "child3" : {
#     "name" : "Linus",
#     "year" : 2011
#   }
# }
# for x, y in myfamily.items():
#     del x, y['year']
#     print(y)

# # Game-'Find treasure'
# import random
# treasure = random.randint(0,50)
# Guess=True
# count=1
# guess_number = int(input('please enter an itegar:'))
# if treasure==guess_number:
#         print("Bingo! The treasures are yours 5555.")
# else:
#    if treasure>guess_number:
#         print("The tresure is bigger than you think. You have a chances left:")
#    else:
#         print("The tresure is smaller than you think. You have a chances left:")
#    guess_number= int(input('please enter an itegar again'))
#    if treasure==guess_number:
#         print("Bingo! The treasures are yours 5555.")
#    else:
#     if treasure<guess_number:
#         print("The tresure is smaller than you think. You have a chances left:")
#     else:
#         print("The tresure is bigger than you think. You have a chances left:")
#    guess_number= int(input('please enter an itegar thirdly'))
#    if treasure==guess_number:
#         print("Bingo! The treasures are yours 5555.")
#    else:
#     if treasure<guess_number:
#         print("The tresure is smaller than you think. You have a chances left:")
#     else:
#         print("The tresure is bigger than you think. You have a chances left:")
#     guess_number = int(input('please enter an itegar fourth time '))
#     if treasure == guess_number:
#         print("Bingo! The treasures are yours 5555.")
#     else:
#         print("Sorry, But The treasures are mine!!!!HAHAHAHAHAHAHA!!!!")





# if int(input('请输入第一次猜想的数字:'))==10:
#     print("恭喜第一次就猜对了呢")
# elif  int(input("错了，请再猜一次:"))==10:
#     print("恭喜第二次就猜对了呢")
# elif  int(input("又错了，请再猜最后一次："))==10:
#     print('恭喜第三次猜对了')
# else:
#     print("sorry,全部猜错了，我想的是：10")








# import random
# num=random.randint(1,100)
# i=0
# #通过布尔类型的变量，做循环是否继续的标记
# flag=True
# while flag:
#     guess_num=int(input("请输入你猜测的数字:") )
#     i+=1
#     if guess_num==num:
#         print('猜中了')
#         #设置为False就是终止循环的条件
#         flag=False
#     else:
#         if guess_num>num:
#             print("大了")
#         else:
#             print('小了')





# for i in range(5):
#     print("* " * (i + 1))
#
# for i in range(1 ):
#     for j in range (9):
#         print("* " * (j + 1))
# # 反方向的直角三角形
# for i in range(10):
#     print(" " * (10- i), end=" ")
#     print("*" * (i + 1))
# 平行四边形
# for i in range(10):
#     print(" " * (10-i), end=" ")
#     print("*" * (2*i+1))
#
# for i in range(10):
#     print(" "*(i+1),end=" ")
#     print("*" * (19-2*i))
#


    # print(" "* (2*i+1)+'',end=" ")
    # print(" "*(i+1),end=" ")
    # print("*" * (19-2*i))
    # print(" "*(i+3))
    # print(" ")

    # print(" "* (3*i+1))




# name_list = ["maka", "baka","chip","Dale","Tom","Jerry","Rick","Morty"]
# l = len(name_list)
# x=0
# for i in name_list:
#     if i=="chip":
#         print("chip", x,"o")
#         break
#     else:
#         x+=1

# sum=1
# for x in range(1,6):
#     sum*=x
# print(sum)


# def fact(n):
#     r=0
#     for i in range(1,n+1):
#          r=r+i
#     return r
# print(fact(5))#r是fact函数里面的一个值

# for i in range(1,10):
#     print(" "*(10-i) +"*"*i)
#
#
# for i in range(0,10):
#     print(" "*(10-i)+'*'*(2*i+1))
# for i in range(2,11):
#     print(" "*i +"*"*(21-i*2))

# def func_multiply(y):
#     y=1
#     for i in  range (1,6):
#        y=y*i
#     return y
# z=func_multiply(5)
# print(f"5的阶
# review exercises
#
# for x in range(5):
#     for y in range(5):
#       print("* ",end=" ") #对应内循环的for
#     print(" ")#对应外循环的for
#
# print("        *******")
# print("          *******")
# print("            *******")
#
# for x in range (8):
#         print((x)*" ",end="  ")
#         print((8-x)*"*")
#
# for i in range(10):
#       print(' '*(10-i),end='  ')
#       print("*"* 10)
# for x in (0,101):
#     if x!=0 and x%1==0 :
#         print(f"{x} is a prime number")
#     else:
#         print(f"{x} is not a prime number")
# student_dict = {
#     "Kendrick Ou": {
#         "Math": 60,
#         "English": 45,
#         "Python": 30
#     },
#     "Jhon Rick":{
#           "Math": 90,
#         "English": 95,
#         "Python": 80
#     },
#     "Stephen Curry":{
#           "Math": 80,
#         "English": 90,
#         "Python": 70
#     }
# }
# sum=0
# for name in student_dict:
#     sum+=student_dict[name]["Math"]

